<h1 style="color:#FF3300;margin-bottom:10px">Flight Manager</h1>
<select id="drdprovide" onchange="location.assign('<?php echo base_url(); ?>admin/flight/index?provide='+$('#drdprovide').val());">
  <option value="0" <?php if(isset($_GET['provide'])){ if($_GET['provide']=="0") echo "selected";}?>>Choose Provide</option>
  <option value="bagan" <?php if(isset($_GET['provide'])){ if($_GET['provide']=="bagan") echo "selected";}?>>Bagan</option>
  <option value="inle" <?php if(isset($_GET['provide'])){ if($_GET['provide']=="inle") echo "selected";}?>>Inle</option>
  <option value="mandalay" <?php if(isset($_GET['provide'])){ if($_GET['provide']=="mandalay") echo "selected";}?>>Mandalay</option>
  <option value="yangon" <?php if(isset($_GET['provide'])){ if($_GET['provide']=="yangon") echo "selected";}?>>Yangon</option>
</select>
<input type="button" onclick="location.assign('<?php echo base_url(); ?>admin/flight/edit');" value="Insert" style="float:right;margin-right:10px;margin-bottom:5px;"/>
<input type="button" onclick="location.assign('<?php echo base_url(); ?>admin/flightbanner/index');" value="Banner" style="float:right;margin-right:10px;margin-bottom:5px;"/>
<table cellpadding="0" cellspacing="0">
  <tr>
    <th>STT</th>
    <th>Airline</th>
    <th>Code</th>
    <th>From => To Place</th>
    <th>Time Arrive</th>
    <th>Time Departure</th>
    <th>Status</th>
    <th>Edit / Del</th>
    <th>Price</th>
  </tr>
  <?php if(count($data)>0){ foreach($data as $k=>$list){?>
  <tr>
    <th><?php echo $k+1; ?></th>
    <td><?php if($list["airline"]==1) echo "Air Bagan";
			  if($list["airline"]==2) echo "Air Mandalay";
			  if($list["airline"]==3) echo "Air KBZ";
			  if($list["airline"]==4) echo "Myanmar Airways";
			  if($list["airline"]==5) echo "Yangon Airways";
			  if($list["airline"]==6) echo "Asian Wings";?></td>
    <th><?php echo $list["codeofairline"]; ?></th>
    <th><?php echo $list["fromplace"]." => ".$list["destination"]; ?></th>
    <th><?php echo $list["timearrive"]; ?></th>
    <th><?php echo $list["timedeparture"]; ?></th>
    <th><select name="changestatus" onChange="location.assign('<?php echo base_url(); ?>/admin/flight/changestatus?id=<?php echo $list["id"] ?>&status='+this.options[this.selectedIndex].value);">
        <option value="1" <?php if($list['status']==1) echo "selected";?>>Highlights</option>
        <option value="2" <?php if($list['status']==2) echo "selected";?>>Normal</option>
        <option value="3" <?php if($list['status']==3) echo "selected";?>>Hidden</option>
      </select></th>
    <th><a href="<?php echo base_url(); ?>admin/flight/edit?id=<?php echo $list['id'] ?>"><img src="<?php echo base_url(); ?>public/admin/img/icons/user_edit.png"/></a> <a href="javascript:void(0);" onClick="if(confirm('Do you want to Del this Information ?')) location.assign('<?php echo base_url(); ?>admin/flight/delete?id=<?php echo $list["id"]; ?>');"><img src="<?php echo base_url(); ?>public/admin/img/icons/user_delete.png"/></a></th>
    <th><a href="<?php echo base_url(); ?>admin/flightprice/index?flightid=<?php echo $list['id'] ?>">Price</a></th>
  </tr>
  <?php }}?>
</table>
